#include "StdAfx.h"
#include "ClearableObjectBase.h"

using namespace Adaptive::Foundation;

/*--------------------------------------------------------------------------------
 * Constructor / Dispose / Destructor Methods
 *------------------------------------------------------------------------------*/
#pragma region Constructor / Dispose / Destructor Methods
// Initializes a new instance of the class.
ClearableObjectBase::ClearableObjectBase()
{
	_cleared = false;
}
ClearableObjectBase::~ClearableObjectBase()
{
	Clear();
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Public Properties
 *------------------------------------------------------------------------------*/
#pragma region Public Properties
// Gets a value indicating whether the object has been disposed.
bool ClearableObjectBase::Cleared::get()
{
	return _cleared;
}
#pragma endregion
 
/*--------------------------------------------------------------------------------
 * Public Methods / Functions
 *------------------------------------------------------------------------------*/
#pragma region Public Methods / Functions
// Clears the contents of the object instance without disposing of the instance.
void ClearableObjectBase::Clear()
{
	_cleared = true;
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Protected Methods / Event Methods
 *------------------------------------------------------------------------------*/
#pragma region Protected Methods / Event Methods
// Raises the <see cref="Clearing"/> event.
void ClearableObjectBase::OnClearing(EventArgs^ e)
{
	Clearing(this, e);
}
void ClearableObjectBase::SetDirty()
{
	_cleared = false;
}
#pragma endregion
